import { HTTP } from '../utils/http'

const baseData = {
  source: 20
}

class FeedbackModel extends HTTP {
  // 提交反馈
  async create(data = {}) {
    const res = await this.request({
      url: '/sea/api/1.0/client/v1/xinshui/feedback/create',
      data: { ...data, ...baseData },
      method: 'POST'
    })
    return res
  }

  // 获取反馈列表
  async feedbackList(data = {}) {
    const res = await this.request({
      url: '/sea/api/1.0/client/v1/xinshui/feedback/list',
      data: { ...data, ...baseData },
      method: 'POST'
    })
    return res
  }

  // 获取反馈信息
  async feedbackGet(data = {}) {
    const res = await this.request({
      url: '/sea/api/1.0/client/v1/xinshui/feedback/get',
      data: { ...data, ...baseData },
      method: 'POST'
    })
    return res
  }

  // 继续反馈
  async feedbackReply(data = {}) {
    const res = await this.request({
      url: '/sea/api/1.0/client/v1/xinshui/feedback/reply',
      data: { ...data, ...baseData },
      method: 'POST'
    })
    return res
  }
}

export default new FeedbackModel()
